package com.kaifamiao.uploader.service;

import com.kaifamiao.uploader.entity.Chunk;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

public interface ChunkService {

    /**
     * 根据文件标识查询所有分片
     * @param identifier
     * @return
     */
    List<Chunk> findChunksByFileIdentifier(String identifier);

    void save(Chunk chunk);

    String merge(String iderntifier) throws IOException;

    void uplaod(Chunk chunk, MultipartFile file) throws IOException;
}
